<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Uncompress a compressed string</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gztell.html">gztell</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gzwrite.html">gzwrite</a></div>
 <div class="up"><a href="ref.zlib.html">Zlib 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.gzuncompress" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzuncompress</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PHP 5)</p><p class="refpurpose"><span class="refname">gzuncompress</span> &mdash; <span class="dc-title">Uncompress a compressed string</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzuncompress-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>gzuncompress</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$length</code><span class="initializer"> = 0</span></span>
  ] )</div>

  <p class="para rdfs-comment">   
   This function uncompress a compressed string.  
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzuncompress-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       The data compressed by <span class="function"><a href="function.gzcompress.html" class="function">gzcompress()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">length</code></em></dt>

     <dd>

      <p class="para">
       The maximum length of data to decode.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzuncompress-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The original uncompressed data or <strong><code>FALSE</code></strong> on error.
  </p>
  <p class="para">
   The function will return an error if the uncompressed data is more than
   32768 times the length of the compressed input <em><code class="parameter">data</code></em> 
   or more than the optional parameter <em><code class="parameter">length</code></em>.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.gzuncompress-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-799">
    <p><strong>Example #1 <span class="function"><strong>gzuncompress()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$compressed&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gzcompress</span><span style="color: #007700">(</span><span style="color: #DD0000">'Compress&nbsp;me'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">9</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$uncompressed&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gzuncompress</span><span style="color: #007700">(</span><span style="color: #0000BB">$compressed</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">$uncompressed</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.gzuncompress-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.gzcompress.html" class="function" rel="rdfs-seeAlso">gzcompress()</a> - Compress a string</span></li>
    <li class="member"><span class="function"><a href="function.gzinflate.html" class="function" rel="rdfs-seeAlso">gzinflate()</a> - Inflate a deflated string</span></li>
    <li class="member"><span class="function"><a href="function.gzdeflate.html" class="function" rel="rdfs-seeAlso">gzdeflate()</a> - Deflate a string</span></li>
    <li class="member"><span class="function"><a href="function.gzencode.html" class="function" rel="rdfs-seeAlso">gzencode()</a> - Create a gzip compressed string</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gztell.html">gztell</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gzwrite.html">gzwrite</a></div>
 <div class="up"><a href="ref.zlib.html">Zlib 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
